package com.example.myerp.controller;


import com.baomidou.mybatisplus.core.metadata.IPage;
import com.example.myerp.pojo.S_cell_fp;
import com.example.myerp.pojo.S_cell_fp2;
import com.example.myerp.pojo.S_cell_fp3;
import com.example.myerp.service.S_cell_fpService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * <p>
 * 前端控制器
 * </p>
 *
 * @author zhuxingyu
 * @since 2021-08-13
 */
@RestController
@RequestMapping("/purchase/s_cell_fp")
public class S_cell_fpController {

    @Autowired
    S_cell_fpService service;

    @RequestMapping("/product_one_Add")
    public Integer Product_one_Add(@RequestParam("oneId") String oneId, @RequestParam("preName") String preName) {
        return service.Product_one_Add(oneId, preName);
    }

    @RequestMapping("/product_second_Add")
    public Integer product_second_Add(@RequestParam("oneId") String oneId,
                                      @RequestParam("secondId") String secondId,
                                      @RequestParam("secondName") String secondName) {
        return service.product_second_Add(oneId, secondId, secondName);
    }

    @RequestMapping("/product_three_Add")
    public Integer product_three_Add(@RequestParam("threeId") String threeId,
                                     @RequestParam("thirdproName") String thirdproName,
                                     @RequestParam("twoId") String twoId) {
        return service.product_three_Add(threeId, thirdproName, twoId);
    }


    @RequestMapping("/getPageList")
    public IPage<S_cell_fp> getPageList(Long pageNum, Long pageSize) {
        return service.getPageList(pageNum, pageSize);
    }


    @RequestMapping("/uodateStoreId")
    public Integer uodateStoreId(Long storeId, Long id, String ilevelarean) {
        return service.uodateStoreId(storeId, id, ilevelarean);
    }

    ///purchase/s_cell_fp/insertadd
    @RequestMapping("/insertadd")
    public Integer insertadd(S_cell_fp s_cell_fp) {
        return service.insertadd(s_cell_fp);
    }

    @RequestMapping("/rowCount")
    public Integer rowCount(S_cell_fp s_cell_fp) {
        return service.rowCount(s_cell_fp);
    }

    @RequestMapping("/getfp2")
    public IPage<S_cell_fp2> getfp2(Long pageNum, Long pageSize) {
        return service.getfp2(pageNum, pageSize);
    }


    @RequestMapping("/ilevelarean")
    public String ilevelarean(Integer firstKindId) {
        return service.ilevelarean(firstKindId);
    }

    @RequestMapping("/product_first_Add2")
    public Integer product_first_Add2(S_cell_fp s_cell_fp) {
        return service.product_second_Add2(s_cell_fp);
    }

    @RequestMapping("/getduiYing")
    public List<S_cell_fp> getduiYing(String firstKindId) {
        return service.getduiYing(firstKindId);
    }

    @RequestMapping("/product_second_Add2")
    public Integer product_second_Add2(S_cell_fp2 s) {

        return service.product_second_Add2(s);
    }

    @RequestMapping("/insertAddS_Cell_fp2")
    public Integer insertAddS_Cell_fp2(S_cell_fp2 s) {
        return service.insertAddS_Cell_fp2(s);
    }


    @RequestMapping("/selectCount_fp2")
    public Integer s_Cell_fp2_Count(S_cell_fp2 s) {
        return service.s_Cell_fp2_Count(s);
    }

    @RequestMapping("/s_cell_fpCount")
    public Integer s_cell_fpCount(Long id) {
        return service.s_cell_fpCount(id);
    }

    @RequestMapping("/delfp2")
    public Integer delfp2(Long id) {
        return service.delfp2(id);
    }

    @RequestMapping("/getPage3")
    public IPage<S_cell_fp3> getPage3(Long pageNum, Long pageSize) {
        return service.getPage3(pageNum, pageSize);
    }

    @RequestMapping("/getHouName")
    public List<S_cell_fp3> getHouName(String secondKindId) {
        return service.getHouName(secondKindId);
    }


    @RequestMapping("/UpdateS_cell_fp3")
    public void UpdateS_cell_fp3(S_cell_fp3 s){
         service.UpdateS_cell_fp3(s);
    }

    @RequestMapping("/dels_cell_fp3")
    public Integer dels_cell_fp3(Long fp2_id){
        return service.dels_cell_fp3(fp2_id);
    }
    @RequestMapping("/s_cell_fp3Count")
    public Integer s_cell_fp3Count(S_cell_fp3 s){
        return service.s_cell_fp3Count(s);
    }

    @RequestMapping("/insertS_cell_fp3")
    public Integer insertS_cell_fp3(S_cell_fp3 s_cell_fp3) {
        return service.insertS_cell_fp3(s_cell_fp3);
    }


    @RequestMapping("/selCountfp3")
    public Integer selCountfp3(Long id){
        return  service.selCountfp3(id);
    }


    @RequestMapping("/delCount_fp2")
    public Integer delCount_fp2(Long id){
         return  service.delCount_fp2(id);
    }
    @RequestMapping("/checkKunCun")// /purchase/s_cell_fp/checkKunCun
    public Integer checkKunCun(Integer firstKindId, Integer secondKindId, Integer thirdKindId) {
         return  service.checkKunCun(firstKindId,secondKindId,thirdKindId);
    }



}
